function sub(str, len = 9) {
    if (str.length > len)
        str = str.substring(0, len) + '...';//控制显示40个字符+....；
    return str;
}

function accMul(arg1, arg2) {
    var m = 0, s1 = arg1.toString(), s2 = arg2.toString();

    try { m += s1.split(".")[1].length } catch (e) { }

    try { m += s2.split(".")[1].length } catch (e) { }

    return Number(s1.replace(".", "")) * Number(s2.replace(".", "")) / Math.pow(10, m)
}

module.exports = {
  accMul: accMul
}